<div class="slider-wrapper theme-<?php echo $nivo_slider_theme; ?>">
  <?php if ($nivo_slider_featured) { ?><div class="ribbon"></div><?php } ?>
  <div id="nivo_slider<?php echo $module; ?>" class="nivoSlider" style="width: <?php echo $width; ?>px; height: <?php echo $height; ?>px;">
    <?php foreach ($banners as $banner) { ?>
    <?php if ($banner['link']) { ?>
    <a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" title="<?php echo $banner['title']; ?>"/></a>
    <?php } else { ?>
    <img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" />
    <?php } ?>
    <?php } ?>
  </div>
</div>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('#nivo_slider<?php echo $module; ?>').nivoSlider({
		effect: '<?php echo $nivo_slider_effect; ?>',
		slices: <?php echo $nivo_slider_slices; ?>,
		boxCols: <?php echo $nivo_slider_box_cols; ?>,
		boxRows: <?php echo $nivo_slider_box_rows; ?>,
		animSpeed: <?php echo $nivo_slider_anim_speed; ?>,
		pauseTime: <?php echo $nivo_slider_pause_time; ?>,
		startSlide: <?php echo $nivo_slider_start_slide; ?>,
		directionNav: <?php if ($nivo_slider_direction_nav) { ?> true <?php } else { ?> false <?php } ?>,
		directionNavHide: <?php if ($nivo_slider_direction_nav_hide) { ?> true <?php } else { ?> false <?php } ?>,
		controlNav: <?php if ($nivo_slider_control_nav) { ?> true <?php } else { ?> false <?php } ?>,
		controlNavThumbs: <?php if ($nivo_slider_control_nav_thumbs) { ?> true <?php } else { ?> false <?php } ?>,
        controlNavThumbsFromRel: <?php if ($nivo_slider_control_nav_thumbs_from_rel) { ?> true <?php } else { ?> false <?php } ?>,
		controlNavThumbsSearch: '<?php echo $nivo_slider_control_nav_thumbs_search; ?>',
		controlNavThumbsReplace: '<?php echo $nivo_slider_control_nav_thumbs_replace; ?>',
		keyboardNav: <?php if ($nivo_slider_keyboard_nav) { ?> true <?php } else { ?> false <?php } ?>,
		pauseOnHover: <?php if ($nivo_slider_pause_on_hover) { ?> true <?php } else { ?> false <?php } ?>,
		manualAdvance: <?php if ($nivo_slider_manual_advance) { ?> true <?php } else { ?> false <?php } ?>,
		captionOpacity: <?php echo $nivo_slider_caption_opacity; ?>,
		prevText: '<?php echo $nivo_slider_prev_text; ?>',
		nextText: '<?php echo $nivo_slider_next_text; ?>',
		randomStart: <?php if ($nivo_slider_random_start) { ?> true <?php } else { ?> false <?php } ?>
	});
});
--></script>